package com.neuedu.springmvc;

import com.neuedu.springmvc.convert.String2DateConvert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.ConversionService;
import org.springframework.format.FormatterRegistry;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 项目：springmvc-java4
 * 创建时间：  2022-03-23   16:23
 * 作者 :jshand
 * 描述 :
 */
@Component
public class Appconfig implements WebMvcConfigurer {

    public Appconfig() {
        System.out.println();
    }

    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverter(new String2DateConvert());
    }
}
